Skip to content

feat(tron-wallet-snap): add Core messenger plumbing - #95

Merged
ulissesferreira merged 3 commits into
mainfrom
WPN-1497-messenger-plumbing
Aug 6, 2026
Merged

feat(tron-wallet-snap): add Core messenger plumbing#95
ulissesferreira merged 3 commits into
mainfrom
WPN-1497-messenger-plumbing

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Instantiate Core messenger via getMessenger and endow RemoteFeatureFlagController:getState
  • Resolve assets migration stage from remote feature flags on each account asset read
  • No routing decisions yet — all reads still delegate to SnapAssetsAdapter

Part 1 of 2 split from #94. Part 2: WPN-1497-core-adapter-routing.

Jira

Test plan

  • yarn workspace @metamask/tron-wallet-snap build
  • yarn workspace @metamask/tron-wallet-snap run jest --no-coverage (887 tests)

Stacks on #92 (WPN-1497-snap-owned-helpers).

@ulissesferreira
ulissesferreira requested review from a team as code owners July 31, 2026 22:08
@socket-security

socket-security Bot commented Jul 31, 2026

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/assets-controller@11.2.0
Direct dependency for Core AssetsController messenger action types; published snap dist does not bundle controller runtime.
Network/fetch is expected for MetaMask controller packages already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/snaps-controllers@19.0.1
Transitive via @metamask/assets-controller (messenger action types only; controller runtime not in published dist).
First-party MetaMask controller package; obfuscation alert is compiled/transpiled controller bundle.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/assets-controllers@110.1.0
Transitive via @metamask/assets-controller (types-only usage; controller runtime not shipped in published dist).
First-party MetaMask controller package; network access expected for RPC/API controllers in MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/config-registry-controller@2.0.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/core-backend@7.0.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/core-backend@8.1.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/eth-json-rpc-infura@10.3.0
Transitive via @metamask/assets-controller. First-party MetaMask JSON-RPC client used by network controllers.
Publisher change gudahtt → metamaskbot is MetaMask org maintainers; package already in MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/geolocation-controller@1.0.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/multichain-network-controller@3.2.2
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/network-controller@34.0.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/network-controller@35.0.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/phishing-controller@17.3.1
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/profile-sync-controller@28.3.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/remote-feature-flag-controller@4.2.2
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/remote-feature-flag-controller@5.0.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/transaction-controller@69.4.0
Transitive via @metamask/assets-controller (types-only import path; controller runtime not in published dist).
First-party MetaMask controller package; network access expected and already used across MetaMask/core.
AI anomaly is benign signature-verification utility code.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@ethersproject/providers@5.8.0
Transitive via @metamask/assets-controller. Standard ethers v5 JSON-RPC provider used by MetaMask controllers.
Not executed in @metamask/tron-wallet-snap published output; already present across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@tanstack/query-core@5.101.4
Transitive via @metamask/assets-controller. Standard TanStack Query core used by MetaMask controllers for data fetching.
Not executed in @metamask/tron-wallet-snap published output; already present across MetaMask/core.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/keccak@3.0.4
Transitive via @metamask/assets-controller → ethereum crypto stack. Standard keccak native addon used across MetaMask/core for address/hash operations.
Native binaries alert is expected for this package.

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/ethereumjs-wallet@1.0.2
Transitive via @metamask/assets-controller. Legacy ethereumjs-wallet used by MetaMask controller dependency tree.
Publisher change is ethereumjs org maintainer rotation; deprecated notice is upstream rename to @ethereumjs/wallet.

@ulissesferreira
ulissesferreira force-pushed the WPN-1497-messenger-plumbing branch from 86f8e33 to 91b9f68 Compare August 5, 2026 11:42
messenger: coreMessenger as RemoteFeatureFlagsProviderMessenger,
});
const assetsProvider = new AssetsProvider({
messenger: coreMessenger as AssetsProviderMessenger,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't been able to automatically have this type set yet. Will ask @mikesposito when he is back to see if we can come up with some ideas.

Comment thread .github/workflows/lint-build-test.yml Fixed
Comment thread .github/workflows/lint-build-test.yml Fixed
@cursor
cursor Bot force-pushed the WPN-1497-messenger-plumbing branch from 4a61bb5 to 5da8934 Compare August 5, 2026 18:09
@cursor
cursor Bot changed the base branch from main to ulissesferreira/ci-share-build-artifacts-cb0e August 5, 2026 18:09
@cursor
cursor Bot force-pushed the WPN-1497-messenger-plumbing branch from 5da8934 to 938c2bf Compare August 5, 2026 18:10
@cursor
cursor Bot force-pushed the ulissesferreira/ci-share-build-artifacts-cb0e branch from 9eb091f to e05970e Compare August 5, 2026 19:08
@cursor
cursor Bot force-pushed the WPN-1497-messenger-plumbing branch 2 times, most recently from 6587ae2 to 9428a52 Compare August 5, 2026 19:34
@ulissesferreira
ulissesferreira marked this pull request as draft August 6, 2026 07:26
Base automatically changed from ulissesferreira/ci-share-build-artifacts-cb0e to main August 6, 2026 07:43
@ulissesferreira
ulissesferreira marked this pull request as ready for review August 6, 2026 08:11
@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@cursoragent rebase with latest main then babysit PR until green

@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

Rebase and CI babysitting are complete. PR #95 is green.

Rebase

  • Rebased WPN-1497-messenger-plumbing onto latest main (6fbb3e38 — chore: support intra-repository dependencies chore: support intra-repository dependencies #126)
  • Two commits were dropped as already upstream:
    • ci: reuse Build job artifacts in the Test matrix
    • build: run workspace builds in topological-dev order
  • Remaining commits (3):
    • feat(tron-wallet-snap): add Core messenger plumbing
    • fix(tron-wallet-snap): sync CI manifest shasum
    • fix(tron-wallet-snap): format manifest and sync CI shasum
  • Force-pushed to origin/WPN-1497-messenger-plumbing

CI status

All 47 checks passed, including:

  • Lint (eslint, misc, constraints, dependencies, readme)
  • Build (24.x)
  • Tests for @metamask/tron-wallet-snap (20.x and 22.x)
  • Changelog validation
  • Security scans (CodeQL, Semgrep, zizmor, Socket Security)
  • Main / All jobs pass (required)

No code changes were needed — the rebase was clean and CI passed on the first run after the push.

Open in Web Open in Cursor 

cursoragent and others added 3 commits August 6, 2026 08:12
Instantiate Core messenger via getMessenger and wire
RemoteFeatureFlagsProvider / AssetsProvider into context for the
upcoming AssetsController migration. Reads still delegate to
SnapAssetsAdapter.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
@cursor
cursor Bot force-pushed the WPN-1497-messenger-plumbing branch from 9428a52 to 489bab0 Compare August 6, 2026 08:14
@ulissesferreira
ulissesferreira added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit ae92221 Aug 6, 2026
49 checks passed
@ulissesferreira
ulissesferreira deleted the WPN-1497-messenger-plumbing branch August 6, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants